package com.button.sharding.controller.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import com.button.sharding.controller.UserController;
import com.button.sharding.pojo.User;
import com.button.sharding.service.UserService;

@RestController
public class UserControllerImpl implements UserController {
	private static final Logger logger = LoggerFactory.getLogger(UserControllerImpl.class);

	@Autowired
	private UserService userService;

	@Override
	public void saveUser() {
		logger.info("开始保存user.");
		userService.saveUser();
	}

	@Override
	public User selectUser(Integer userId) {
		return userService.selectUser(userId);
	}
}
